package com.wang.lotterysystem.controller.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

@Data
public class PageParam implements Serializable {

    @Schema(description = "当前页页码")
    private Integer currentPage = 1;

    @Schema(description = "一页展示的数据条数")
    private Integer pageSize = 10;

    /*
    获取每一页开始的位置
     */
    public Integer offset() {
        return (currentPage-1) * pageSize;
    }


}
